Skip to content

Fix PM-6279 copilot opportunity skill search - #42

Merged
jmgasper merged 1 commit into
devfrom
fix/PM-6279-copilot-search
Sep 9, 2026
Merged

Fix PM-6279 copilot opportunity skill search#42
jmgasper merged 1 commit into
devfrom
fix/PM-6279-copilot-search

Conversation

@jmgasper

@jmgasper jmgasper commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • cast copilot request data to JSONB before JSONB-only skill predicates
  • support both legacy upgraded databases with a physical json column and current jsonb schemas
  • add focused SQL regression coverage and document the compatibility behavior

Root cause

The search and skills filters assumed copilot_requests.data was physically jsonb. Some upgraded v5 environments retain it as json, so the search COALESCE mixed json and jsonb and the skills predicate called jsonb-only functions with json input. PostgreSQL rejects those expressions and the endpoint returns 500. Project-name-only filtering avoids those expressions, explaining why it continued to work.

Validation

  • focused CopilotOpportunityService suite: 14/14 passed
  • pnpm lint: passed
  • pnpm build: passed
  • manual PostgreSQL 17 checks: corrected predicates work against both json and jsonb columns
  • full unit suite: 381 passed; the same 15 unrelated failures reproduce on origin/dev
  • full end-to-end suite: 73 passed; the same 8 unrelated failures reproduce on origin/dev

@jmgasper
jmgasper merged commit 9c3caae into dev Sep 9, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant